class Person {
  static commonProp: string;
  name: string;
  age: number;
  eatthing?(): void;
  private salary: number;
  protected address: string;

  constructor(name: string, age: number, salary: number, address: string = 'Unknown') {
    this.name = name;
    this.age = age;
    this.salary = salary;
    this.address = address;
  }

  greet(): string {
    return `Hello, my name is ${this.name} and I am ${this.age} years old.`;
  }
}

class Man extends Person {
  prossion: string;
  constructor(name: string, age: number, salary: number, address: string, prossion: string) {
    super(name, age, salary, address);
    this.prossion = prossion;
  }
}

abstract class Animal {
  abstract speak(): string
}

class Dog extends Animal {
  speak(): string {
    return 'Woof!';
  }
}
class Cat extends Animal {
  speak(): string {
    return 'Meow!';
  }
}

interface IUser {
  name: string;
  age: number;
  greet(): string;
}

class User implements IUser {
  constructor(public name: string, public age: number) {}
  greet(): string {
    return `Hello, my name is ${this.name} and I am ${this.age} years old.`;
  }
}

class Cat2 {
  private price: number = 100;
  constructor(public brand: string) {}
  getPrice(): number {
    return this.price;
  }
}

const cat = new Cat2('Maine Coon');
console.log(cat.brand)
console.log(cat.getPrice())

export {}